#include <stdio.h>

int main()
{ 
    int num[5];
    int max, secondMax;

    printf("请输入5个整数：\n");
    for(int i = 0;i < 5;i++)
    {
        scanf("%d", &num[i]);
    }

    max = secondMax = num[0];
    for(int i = 1;i < 5;i++)
    {
        if(num[i] > max)
        {
            secondMax = max;
            max = num[i];
        }
        else if(num[i] > secondMax && num[i] != max)
        {
            secondMax = num[i];
        }
    }
    printf("第二大的元素为：%d\n", secondMax);

    return 0;
} 